package com.feiyuan.core;

import com.feiyuan.core.aspect.PermissionsAspect;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

/**
 * 启动类
 */
@EnableDiscoveryClient // 服务注册与发现
@EnableFeignClients // 开启远程服务调用
@SpringBootApplication
@ComponentScan({"com.feiyuan", "com.feiyuan.common"})
@Import(value = {PermissionsAspect.class})
public class ServiceCoreApplication {

    public static void main(String[] args) {
        try {
            SpringApplication.run(ServiceCoreApplication.class, args);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}